<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>添加评论</title>
    <script src="__STATIC__/js/base.js"></script>
    <link rel="stylesheet" href="__STATIC__/css/userinfo.css">
    <script src="__STATIC__/js/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="__STATIC__/js/raty/jquery.raty.min.js"></script>
</head>
<style>
  #function-demo img{
      width: 15%;
  }
</style>
<body>
<section>
    <div id="content" class="with-90">
        <form action="#"   id="form1">
            <div class="comment-img size-18">服务星级评价</div>
            <div class="demo">
                <div id="function-demo" class="target-demo" style="margin: 0 auto"></div>
                <div id="function-hint" class="hint"></div>
            </div>
            <div class="size-18 comment-content">服务内容评价</div>
            <div class="comment-input"> <textarea onfocus="if(value=='请输入...'){value=''}" onblur="if (value ==''){value='请输入...'}">请输入...</textarea></div>
            <input type="hidden" name="score" id="score">
            <input type="button" class="login-button" value="完成" id="sublimit" style="width: 100%;border: none;margin-top: 2.28rem">
        </form>
    </div>
</section>
<script type="text/javascript">
    $(function () {
        $.fn.raty.defaults.path = '__STATIC__/js/raty/img';
        $('#function-demo').raty({
            number: 5,//多少个星星设置
            targetType: 'hint',//类型选择，number是数字值，hint，是设置的数组值
            path: '__STATIC__/js/raty/img',
            size:44,
            hints: ['差', '一般', '好', '非常好', '全五星'],
            cancelOff: 'cancel-off-big.png',
            cancelOn: 'cancel-on-big.png',
            starHalf: 'star-half-big.png',
            starOff: 'star-off-big.png',
            starOn: 'star-on-big.png',
            target: '#function-hint',
            cancel: false,
            targetKeep: true,
            targetText: '请选择评分',
            click: function (score, evt) {
                alert('ID: ' + $(this).attr('id') + "\nscore: " + score + "\nevent: " + evt.type);
                $('#score').val(score);
            }
        });
    });
</script>
</body>
</html>